import request from '@/utils/request'

// 保存字典
export function save(dict) {
  return request({
    url: '/dict/sysDict/sysDictItem/save',
    method: 'post',
    data: dict
  })
}

// 获取分页数据
export function getList(listQuery) {
  return request({
    url: '/dict/sysDict/sysDictItem/getByPage',
    method: 'get',
    params: listQuery
  })
}

// 数据
export function getDataById(id) {
  return request({
    url: '/dict/sysDict/sysDictItem/getById',
    method: 'get',
    params: {
      id: id
    }
  })
}

// 删除数据
export function delData(ids) {
  return request({
    url: '/dict/sysDict/sysDictItem/del',
    method: 'post',
    data: ids
  })
}

// 获取字典条目
export function getItemByDictKey(dictKey) {
  return request({
    url: '/dict/sysDict/sysDictItem/getItemByDictKey',
    method: 'get',
    params: {
      'dictKey': dictKey
    }
  })
}
